package com.example.idachuappone.index.welcomentity;

import java.io.Serializable;
import org.json.JSONObject;

public class Packages implements Serializable {
    private String description;
    private String id;
    private String name;
    private String price;

    public Packages parseJson(JSONObject json) {
        if (json == null) {
            return null;
        }
        if (json.has("id")) {
            this.id = json.optString("id");
        }
        if (json.has("name")) {
            this.name = json.optString("name");
        }
        if (json.has("description")) {
            this.description = json.optString("description");
        }
        if (!json.has("price")) {
            return this;
        }
        this.price = json.optString("price");
        return this;
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPrice() {
        return this.price;
    }

    public void setPrice(String price) {
        this.price = price;
    }
}
